(function(window) {
  function Waf() {
    return new Waf.fn.init();
  }
  Waf.fn = Waf.prototype = {};
  Waf.fn.init = function() {};
  var init = Waf.fn.init;
  init.prototype = Waf.fn;
  window.Waf = Waf;
})(window);

Waf.fn.abc = function() {
  console.log('abc');
};

// 这是典型的类似jQuery 模块的构建方式
(function(window) {
  function Waf1() {
    return new WafDemo();
  }

  function WafDemo() {}

  // WafDemo.prototype = Waf1.prototype = {};

  WafDemo.prototype.abc = function() {
    console.log('abc');
  };

  window.Waf1 = Waf1;
})(window);

//  这里的问题是 es5 的 继承问题会破坏 constructor

function aa1() {}

aa1.prototype.abc = function() {};

var oAa1 = new aa1();
